<?xml version="1.0" encoding="ISO-8859-1" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
		xmlns:h="http://java.sun.com/jsf/html"
		xmlns:f="http://java.sun.com/jsf/core"
		xmlns:ui="http://java.sun.com/jsf/facelets">
<f:view locale="#{facesContext.externalContext.requestLocale}">
<head>
<link rel="stylesheet" type="text/css" href="style.css"/>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
<title>#{msg.titulo}</title>
</head>
<h:body>
<div class="superior">
<font size="40" color="#FFFFFF">#{msg.nome_banco}</font>
</div>
<ui:insert name="menu">
    <ui:include src="menu.xhtml" />
</ui:insert>
<h:form id="transferenciaForm">
<div class="painel">
	<table border="0" width="100%">
	<tr>
		<td align="left" style="border-bottom: #FF6600 3px solid;" colspan="3"><b>#{msg.titulo_transferencia}</b></td>
	</tr>
	<tr>
		<td style="border-bottom: #FF6600 1px solid;" align="right">#{msg.label_valor}</td>
		<td style="border-bottom: #FF6600 1px solid;" colspan="2" >
			<h:inputText size="9" value="#{transferenciaMB.valor}" id="valor" align="right" required="true" requiredMessage="#{msg.erro_obrigatorio}" converterMessage="#{msg.erro_valorInvalido}">
				<f:converter converterId="MyDoubleConverter" />
				<f:validator validatorId="MoedaValidator"/>
			</h:inputText> <h:message for="valor" errorStyle="color:red"/>
		</td>
	</tr>
	<tr>
		<td style="border-bottom: #FF6600 1px solid;" align="right">#{msg.label_descricao}</td>
		<td style="border-bottom: #FF6600 1px solid;" colspan="2"><h:inputText value="#{transferenciaMB.descricao}" id="descricao"/></td>
	</tr>
	<tr>
		<td style="border-bottom: #FF6600 1px solid;" align="right">#{msg.label_favorecido}:</td>
		<td style="border-bottom: #FF6600 1px solid;" colspan="2">
			<h:selectOneMenu id="favorecidos" value="#{transferenciaMB.favorecido.codigo}" varStatus="status" required="true" requiredMessage="#{msg.erro_obrigatorio}">
				<f:selectItem itemValue="#{null}" itemLabel="#{msg.label_selecione_favorecido}"/>
				<f:selectItems value="#{correntistaMB.itemsFavorecidos}" />
			</h:selectOneMenu>
			<h:message for="favorecidos" errorStyle="color:red"/>
			<a href="favorecido.jsf">#{msg.cadastrar_favorecido}</a>
		</td>
	</tr>
	<tr>
		<td style="border-bottom: #FF6600 1px solid;" align="right">#{msg.label_agendamento}</td>
		<td style="border-bottom: #FF6600 1px solid;" align="center">
			<h:selectOneRadio value="#{transferenciaMB.agendada}" id="agendada">
	   			<f:selectItem itemValue="hoje" itemLabel="#{msg.label_paraHoje}"/>
	   			<f:selectItem itemValue="futura" itemLabel="#{msg.label_dataFutura}"/>
			</h:selectOneRadio>
		</td>
		<td style="border-bottom: #FF6600 1px solid;" align="left">
			<h:inputText size="9" value="#{transferenciaMB.agendamento}" id="agendamento" converterMessage="#{msg.erro_dataInvalida}" required="true">
				<f:convertDateTime pattern="dd/MM/yyyy" timeZone="GMT-3"/>
			</h:inputText> #{msg.label_formato_data} <h:message for="agendamento" errorStyle="color:red"/>
		</td>
	</tr>
	<tr>
		<td style="border-bottom: #FF6600 1px solid;" align="right">#{msg.label_senha_cartao}</td>
		<td style="border-bottom: #FF6600 1px solid;" align="left" colspan="3">
			<h:inputText size="9" value="#{transferenciaMB.senhaDigitada}" id="senhaDigitada" align="right" required="true" requiredMessage="#{msg.erro_obrigatorio}">
				<f:validator validatorId="senhaCartaoValidator"/>
			</h:inputText> <h:message for="senhaDigitada" errorStyle="color:red"/>
		</td>
	</tr>
	<tr>
		<td align="center" colspan="3"><h:commandButton value="#{msg.botao_salvar}" action="#{transferenciaMB.realizarTransferencia}" /></td>
	</tr>
	</table>
</div>
</h:form>
</h:body>
</f:view>
</html>